The traditional approaches for treating oligopeptides and proteins in molecular mechanics and molecular dynamics assume that the charges are invariant to conformational changes. These charges are fixed at the beginning and are kept constant throughout the whole simulation. Attempts to use these traditional approaches to explain some experimental dependences of oligopeptide conformation on pH have not been very successful. Our goal was focused on a specific aspect of the folding processes: It attempts to understand how the enviroment affects the conformational preference of a short polypeptide with the sequence: Ac-ETGTKAELLAKYEATHK-NHMe, and vice versa; i.e. how the conformation affects the pK's of ionizable groups. In our work a new approach is presented. It considers explicitly the coupling between the conformation of the molecule and the ionization equilibria at a given pH value. Calculations of the solvation free energy and free energy of ionization of this 17-residue (for which the available NMR and CD experimental data indicate that the conformations containing a right-handed alpha-helix segment at low pH are energetically more favorable) were carried out using a fast multigrid boundary element method (MBE). The MBE method was integrated into ECEPP/3 (Empirical Conformational Energy Program for Peptides) algorithm to compute the coupling between the ionization state and the conformation of the molecule. The results of our calculations using the present method agree quite well with experiments, in contrast with previous applications with standard techniques (using pre-assigned charges at each pH). In particular we have been able to show how the coupling to the conformation leads to different degree of ionization of a given type of residue, for example glutamic acid, at different positions in the amino acid sequence, at a given pH. The results of this study provide a sound basis to discuss the origin of the stability of oligopeptide conformations and its dependence on enviromental conditions. We expect to continue with the development of this approach and further testing of a series of oligopeptides of biological interest.